package workTest;

public class work01 {
    public static void main(String[] args) {
        int a[] = {19,56,25,3,45,78,100,1,0,9};
        int b;
        for (int i = 0; i < 5; i++) {
            for (int j = 0; j < 5-i; j++) {
                if (a[j] > a[j+1]){
                    b = a[j+1];
                    a[j+1] = a[j];
                    a[j] = b;
                }
            }
        }
        int c;
        for (int i = 0; i < 5; i++) {
            for (int j = 5; j < 10-i-1; j++) {
                if (a[j] < a[j+1]){
                    c = a[j+1];
                    a[j+1] = a[j];
                    a[j] = c;
                }
            }
        }
        for (int i : a) {
            System.out.print(i + " ");
        }
    }
}
